import request from '@/utils/request'

function url(u) {
  const prefix = '/room'
  return `${prefix}${u || ''}`
}


/**
 * 设备绑定会议室
 * @param {string} room 房间号
 * @param {int} device 设备号
 */
export function boundMeetingRoom(room,device) {
  const data = {
    room,
    device
  }
  return request({
    url: url('/boundroom'),
    method: 'post',
    data: data
  })
}

export function currentMeetingInfo(room) {
  return request({
    url: url('/nowuse'),
    method: 'get',
    params: { room }
  })
}

export function AllDayMeetingInfo(room) {
  return request({
    url: url('/todayuse'),
    method: 'get',
    params: { room }
  })
}
